package com.xidian.zhiancloud.controller.cgs.TrainManager;
import com.xidian.zhiancloud.dto.ResultDTO;
import com.xidian.zhiancloud.enums.GeneralResponseEnums;
import com.xidian.zhiancloud.service.cgs.TrainManager.TrainingEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * 教育培训-培训评估管理接口
 * @Author:luling
 * @Date:2021/1/8  17:23
 **/
@RestController
@RequestMapping("/TrainingEvaluation")
public class TrainingEvaluationController {
    @Autowired
    private TrainingEvaluationService trainingEvaluationService;
    /**
     * 列表查询
     * @param department 培训部门
     * @param  peopleNum  培训人数
     * @param studyType   培训形式
     * @param  score   培训得分
     * @param   key    关键字
     * @param current   分页偏移量
     * @param size    每一页的数量
     * @return 返回培训评估列表
     **/
    @GetMapping("/getList")
    public ResultDTO getList(@RequestParam(value = "department", required = false) String department,
                             @RequestParam(value = "peopleNum", required = false) String peopleNum,
                             @RequestParam(value = "studyType", required = false) String studyType,
                             @RequestParam(value = "score", required = false) String score,
                             @RequestParam(value = "key", required = false) String key,
                             @RequestParam(value = "current", required = true) int current,
                             @RequestParam(value = "size", required = true) int size) {
        return ResultDTO.successOf(trainingEvaluationService.getList(department, peopleNum,studyType,score,key,current, size), GeneralResponseEnums.SUCCESS);
    }
}

